// 这是关于文章分类的api模块
import request from '@/utils/request.js'
// 获取分类
export const reqGetArtCateList = () => request({
  method: 'get',
  url: '/my/cate/list '
})

// 新增分类
export const reqAddCate = data => request({
  method: 'post',
  url: '/my/cate/add',
  data
})
// 删除分类
export const reqDelCate = id => request({
  method: 'delete',
  url: '/my/cate/del?id=' + id
})
/* export const reqDelCate = id => request({
  method: 'delete',
  url: '/my/cate/del',
  // axios中get/ delete请求携带参数 使用parmas
  params: {id}
}) */

// 根据id查询分类信息
export const reqGetCateInfoById = id => request({
  method: 'get',
  url: '/my/cate/info?id=' + id
})

// 修改提交
// post 新增  put 修改的提交 传参和post一样 也是使用data
export const reqUpdateCate = data => request({
  method: 'put',
  url: '/my/cate/info',
  data
})
